package net.qhzw.vip.qiyu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 平台用户
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_user")
public class SysUser implements Serializable {
    static final long serialVersionUID = -1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @TableField(value = "parent_id")
    private Long parentId;



    /**
     * 商铺ID
     */
    @TableField(value = "shop_id")
    private Long shopId;

    /**
     * 担保公司id
     */
    @TableField(value = "company_id")
    private Long companyId;

    /***
     * 站点ID
     */
    @TableField(value = "community_id")
    private Long communityId;

    /***
     * 担保公司旗下站点
     */
    @TableField(value = "stie_id")
    private Long stieId;

    @TableField(exist = false)
    private String companyName;

    /**
     * 账号
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 姓名
     */
    @TableField(value = "fullname")
    private String fullname;

    /**
     * 手机号
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 状态 0-无效； 1-有效；
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 修改人
     */
    @TableField(value = "modify_by")
    private Long modifyBy;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 修改时间
     */
    @TableField(value = "last_update_time")
    private Date lastUpdateTime;

    /***
     * 角色id
     */
    @TableField(value = "role_id")
    private Long roleId;

    /**
     * 角色名称
     */
    @TableField(exist = false)
    private String roleName;

    /**
     * 角色名称
     */
    @TableField(exist = false)
    private String roleCode;

    @TableField(exist = false)
    private List<String> permissions;



    @TableField(exist = false)
    private Integer shopType;

}